const { defineConfig } = require('@vue/cli-service')
const Mock = require("mockjs")
const data = Mock.mock({
  "list|10":[{
      name:"@cname",
      date:"@date",
      address:"@ctitle(5,8)"
  }]
})
module.exports = defineConfig({
  transpileDependencies: true,
  devServer:{
    onBeforeSetupMiddleware({app}){ // 给前端返回接口的  
        //   /是绝对路径，指的是localhost：8080/list
        app.get("/list",(require,response)=>{
          response.send(data.list)
        })
    }
  }
})
